package com.dotflat.rest.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.matt.commons.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * 园区数据
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@MappedSuperclass
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" })
public abstract class AreableObjectBase extends Domain {

    @Column(columnDefinition = "varchar(32)  COMMENT '创建人'")
    public String createdBy;

    @Column(columnDefinition = "varchar(32)  COMMENT '园区ID'")
    @JsonIgnore
    public String areaId;

    @Column(columnDefinition = " int(3) DEFAULT 0 COMMENT '审核状态 0.待审核  1.审核通过  2.审核拒绝' ", nullable = false)
    public Integer audited = 0;

    @Column(columnDefinition = " int(3) DEFAULT 0 COMMENT '归档  0.未归档  1.归档' ", nullable = false)
    public Integer archived = 0;
}
